home *** CD-ROM | disk | FTP | other *** search
/ The Charlie Rose Science Series Anthology / The Charlie Rose Science Series Anthology (Pfizer, Inc.)(2008).iso / mac / Charlie Rose Science Series Anthology.app / Contents / Resources / movie.swf / scripts / __Packages / mx / controls / streamingmedia / FullScreenToggleControl.as < prev    next >
Text File  |  2008-02-01  |  1KB  |  53 lines

  1. class mx.controls.streamingmedia.FullScreenToggleControl extends MovieClip
  2. {
  3.    function FullScreenToggleControl()
  4.    {
  5.       super();
  6.       this.init();
  7.    }
  8.    function init()
  9.    {
  10.       this.toggle = this._parent;
  11.       this.setEnabled(this.toggle.getEnabled());
  12.    }
  13.    function handleRollOver()
  14.    {
  15.       this.getController().setNotAnimating(true);
  16.    }
  17.    function handleRollOut()
  18.    {
  19.       this.getController().setNotAnimating(false);
  20.    }
  21.    function handleRelease()
  22.    {
  23.       this.toggle.toggleDisplay();
  24.    }
  25.    function getController()
  26.    {
  27.       return this.toggle.getPlayer().getController();
  28.    }
  29.    function getEnabled()
  30.    {
  31.       return this._enabled;
  32.    }
  33.    function setEnabled(is)
  34.    {
  35.       mx.controls.streamingmedia.Tracer.trace("FullScreenToggleControl.setEnabled: " + is);
  36.       this._enabled = is;
  37.       if(is)
  38.       {
  39.          this.onRollOver = this.handleRollOver;
  40.          this.onRollOut = this.handleRollOut;
  41.          this.onRelease = this.handleRelease;
  42.          this.gotoAndStop("_up");
  43.       }
  44.       else
  45.       {
  46.          delete this.onRollOver;
  47.          delete this.onRollOut;
  48.          delete this.onRelease;
  49.          this.gotoAndStop("_disabled");
  50.       }
  51.    }
  52. }
  53.